<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>信息--项目管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/css/public.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form linksAdd">
    <input type="hidden" value="" id="orgId" name="orgId">
                   <!--  <div class="layui-form-item">
        <label class="layui-form-label">组织单位编码</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" id="orgCode" name="orgCode" lay-verify="required" placeholder="请输入组织单位编码">
        </div> -->
    </div>
                <div class="layui-form-item">
        <label class="layui-form-label">组织单位名称</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" id="orgName" name="orgName" lay-verify="required" placeholder="请输入组织单位名称">
        </div>
    </div>
     <div class="layui-form-item">
        <label class="layui-form-label">父级组织</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" id="parentName" onclick="getTree()" placeholder="请选择父级组织" readonly="readonly">
            <input type="hidden" class="layui-input" id="parentId" name="parentId"  readonly="readonly">
        </div>
    </div>
<!--                 <div class="layui-form-item"> -->
<!--         <label class="layui-form-label">排序</label> -->
<!--         <div class="layui-input-block"> -->
<!--             <input type="text" class="layui-input" id="seq" name="seq" lay-verify="required" placeholder="请输入排序"> -->
<!--         </div> -->
<!--     </div> -->
                <div class="layui-form-item">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" id="leader" name="leader" lay-verify="required" placeholder="请输入联系人">
        </div>
    </div>
                <div class="layui-form-item">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" id="phone" name="phone" lay-verify="required" placeholder="请输入手机号">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">所属省</label>
        <div class="layui-input-block area-picker province">
        	<select name="province" class="province-selector"  lay-filter="province" id="province">
                    <option value="">请选择省</option>
                </select>
            <input  type="hidden" class="layui-input"  id="_province" >
        </div>
    </div>
      <div class="layui-form-item">
        <label class="layui-form-label">市</label>
        <div class="layui-input-block area-picker city">
         	<select name="city" class="city-selector"  lay-filter="city" id="city">
                    <option value="">请选择市</option>
            </select>
        		 
            <input type="hidden" class="layui-input" id="_city" >
     </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">区</label>
        <div class="layui-input-block area-picker area">
         <select name="area" class="county-selector"  lay-filter="area" id="area">
                    <option value="">请选择区</option>
                </select>
            <input type="hidden" class="layui-input" id="_area" >
        </div>
    </div>
                <div class="layui-form-item">
        <label class="layui-form-label">地址</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" id="adress" name="adress"  placeholder="请输入地址">
        </div>
    </div>
                <div class="layui-form-item">
        <label class="layui-form-label">状态：</label>
        <div class="layui-input-block">
			<select name="statue" id="statue">
				<option value="1">启用</option>
				<option value="0">禁用</option>
			</select>
		</div>
<!--         <div class="layui-input-block"> -->
<!--             <input type="text" class="layui-input" id="statue" name="statue" lay-verify="required" placeholder="请输入状态：0正常，1：停用"> -->
<!--         </div> -->
    </div>
             
    <div class="layui-form-item">
        <button class="layui-btn layui-block" lay-filter="addOrganization" lay-submit>保存</button>
    </div>
</form>
<script type="text/javascript" src="/static/layui/layui.js"></script>
<script type="text/javascript" src="/static/js/organization/info.js"></script>
<script type="text/javascript" src="/static/js/jquery-1.9.1.min.js"></script>
	 <script>
        //配置插件目录
        layui.config({
            base: '/static/js/layarea/'
            , version: '1.0'
        });
        //一般直接写在一个js文件中
        layui.use(['layer', 'form', 'layarea'], function () {
            var layer = layui.layer
                , form = layui.form
                , layarea = layui.layarea;

            let obj1 = layarea.render({
                elem: '.area-picker',
                data: {
                     province: $("#_province").val(),
                     city: $("#_city").val(),
                     county: $("#_area").val(),
                },
                change: function (res) {
                    //选择结果
                    console.log(res);
                }
            });
        });
        
    </script>
</body>
</html>